﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using IHISCETeim.DAL;
using IHISCETeim.Model;
using IHISCETeim.Library;
using System.Data;

namespace IHISCETeim.BLL
{
    public class UTallySurveyController : BaseController
    {
        public static int Add(UTallySurveyInfo obj)
        {
            return UTallySurveyDAL.Add(obj);
        }
        public static bool Delete(int UTSID)
        {
            return UTallySurveyDAL.Delete(UTSID);
        }
        public static UTallySurveyInfo GetBySerialNumber(string SerialNumber)
        {
            return CBO.FillObject<UTallySurveyInfo>( UTallySurveyDAL.GetBySerialNumber(SerialNumber));
        }
        public static DataTable GetPagination(string MachineType, string SerialNumber, string AgentName, string SurveyDateFrom, string SurveyDateTo, int IsKeep, int PageIndex, int PageSize, string Sort, ref int TotalCount)
        {
            return UTallySurveyDAL.GetPagination(MachineType, SerialNumber, AgentName, SurveyDateFrom, SurveyDateTo, IsKeep,PageIndex, PageSize, Sort, ref  TotalCount);
        }
        public static DataTable GetReport(string AgentName, string fromdate, string todate)
        {
            return UTallySurveyDAL.GetReport(AgentName, fromdate, todate);
        }
    }
}
